package com.wangtao.firstapp.fragments.personfragments;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.wangtao.firstapp.R;
import com.wangtao.firstapp.activity.stairactivity.WriteArticleActivity;

/**
 * 我的原创  下文章Fragment
 * Created by lanouhn on 16/9/19.
 */
public class ArticlesOriginalFragment extends Fragment {
    private RelativeLayout writearticle_articlesoriginal;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = LayoutInflater.from(getActivity()).inflate(R.layout.articlesoriginalfragment, null);
        writearticle_articlesoriginal = (RelativeLayout) view.findViewById(R.id.writearticle_articlesoriginal);
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        writearticle_articlesoriginal.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), WriteArticleActivity.class);
                startActivity(intent);
            }
        });
    }
}
